﻿using MTP.Serialize;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;

namespace Peer.Converter
{
    class DefaultConverter : BaseConverter
    {

        public override T Deserialize<T>(byte[] bytes)
        {
            return MTPSerialize.Deserialize<T>(bytes);
        }

        public override object DeserializeObject(byte[] bytes, Type type)
        {
            return MTPSerialize.Deserialize(bytes, type);
        }

        public override byte[] Serialize(object data)
        {
            return MTPSerialize.Serialize(data);
        }

    }
}
